package com.zx.designpattern.presenter;

import java.lang.ref.WeakReference;

/**
 * @作者 Administrator
 * @创建时间 2018-02-03 22:43
 * @描述 BasePresenter
 * @修改时间 2018-02-03 22:43
 * @修改描述
 * @修改者 Administrator
 **/
public class BasePresenter<T> {

    //view层引用
    WeakReference<T> baseView;

    public void attachView(T baseView) {
        this.baseView = new WeakReference<T>(baseView);
    }

    public void detachView() {
        this.baseView.clear();
    }
}
